package com.ddwl.shop.job;


import com.ddwl.shop.service.ShopService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RequiredArgsConstructor
public class ShopJobHandler {

    private final ShopService shopService;

    @XxlJob("ShopLocJob")
    public ReturnT<String> shopLocJob(String param) {
        log.info("############## 执行ShopLocJob Begin #########");
        shopService.syncShopLoc();
        log.info("############## 执行ShopLocJob End #########");
        return ReturnT.SUCCESS;
    }

}
